package com.hundsun.yr.universal.p2p.widget;

import android.content.Context;
import android.text.Spannable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.hundsun.mobile.zwgt.R;
/**
 * 投资成功页面  列表ITEM对象 包含竖线
 * @author tonglj
 *
 */
public class InvestSuccessItemView extends LinearLayout{
	/**
	 * icon
	 */
	private ImageView mImg;
	private TextView mTVtitle,mTVcontext;
	/**
	 * 竖线
	 */
	private View mLine;

	public InvestSuccessItemView(Context context, AttributeSet attrs) {
		super(context, attrs);
		setOrientation(LinearLayout.VERTICAL);
		((LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.item_invest_success, this);
		mImg = (ImageView) findViewById(R.id.item_invest_success_img);
		mTVtitle = (TextView) findViewById(R.id.item_invest_success_tvtitle);
		mTVcontext = (TextView) findViewById(R.id.item_invest_success_tvcontent);
		mLine =  findViewById(R.id.item_invest_line);
		
	}
	
	public void setLineVisible(int visibity){
		mLine.setVisibility(visibity);
	} 
	/**
	 * 待改进
	 * @param resid
	 */
	public void setTitle(int resid){
		mTVtitle.setText(resid);
	}
	/**
	 * 待改进
	 * @param resid
	 */
	public void setTitle(Spannable resid){
		mTVtitle.setText(resid);
	}
	public void setImg(int resid){
		mImg.setImageDrawable(getResources().getDrawable(resid));
	}
	public void setContent(String text){
		mTVcontext.setText(text);
	}
	
	
	
	
	
	
	

	

}
